/*
 ======================================================
 Name        : PinyinConvertUtil.h
 Author      : VoIP_iPhone
 Version     : 1.0
 Copyright   : Copyright cienet 2010. All rights reserved.
 Description : 获取汉字的拼音
 ======================================================
 */

#import <Foundation/Foundation.h>

@interface PinyinConvertUtil : NSObject 

/*        
 ****************************************************************
 Example:
 Function Name  :  firstCodeOfString
 NSString *str1 = [PinyinConvertUtil firstCodeOfString:@"?g字H4"];
 //str结果为:"?gzH4"     
 
 NSString *str2 = [PinyinConvertUtil firstCodeOfString:@"G字"];
 //str结果为:"Gz"      
 
 NSString *str3 = [PinyinConvertUtil firstCodeOfString:@"文G字5j"];
 //str结果为:"wGz5j"   
 ****************************************************************
 */

/**
 *Function Name   :firstCodeOfString
 *Function Desc   :获取汉字拼音首字母，数字和英文字符原样返回
 *Parameter       :汉字字符串
 *ReturnValue     :汉字拼音首字母字符串
 */
+ (NSString *)firstCodeOfString:(NSString *)string;

/*        
 ****************************************************************
 Example:
 Function Name  :  fullCodeOfString
 NSString *str1 = [PinyinConvertUtil fullCodeOfString:@"?g字H4"];
 //str结果为:"?gziH4"     
 
 NSString *str2 = [PinyinConvertUtil fullCodeOfString:@"G编码9"];
 //str结果为:"Gbianma9"  
 
 NSString *str3 = [PinyinConvertUtil fullCodeOfString:@"阿文G字5j"];
 //str结果为:"awenGzi5j"   
 ****************************************************************
 */

/**
 *Function Name   :fullCodeOfString
 *Function Desc   :获取汉字全拼，数字和英文字符原样返回
 *Parameter       :汉字字符串
 *ReturnValue     :汉字全拼
 */
+ (NSString *)fullCodeOfString:(NSString *)string;


/*        
 ****************************************************************
 Example:
 Function Name  :  isChinese
 BOOL b1 = [PinyinConvertUtil isChinese:@"?g字H4"];
 //b1:YES 
 
 BOOL b2 = [PinyinConvertUtil isChinese:@"?asd343"];
 //b2:NO       
 ****************************************************************
 */

/**
 *Function Name   :isChinese
 *Function Desc   :字符串中是否有汉字
 *Parameter       :字符串
 *ReturnValue     :字符串中是否有汉字
 */
+ (BOOL)isChinese:(NSString *)string;
+ (NSString *)gb2312OfString:(NSString *) string;

@end
